Ext.define('Admin.view.archive.TradeWayController', {
	        extend : 'Admin.app.archive.CustomController',

	        alias : 'controller.tradeWay',

//	        beforeInsert : function(record, parent) {
//		        record.data.type = Admin.sec.TradeWay;
//		        record.data.parent = record.data.id;
//	        },
	        onInsertClick : function(btn){
	        	var me = this, grid = btn.ownerCt.ownerCt, parent = me.getViewModel().get('record');
		        if (!parent)
			        return;
		        var record = Ext.create(grid.getStore().model, {
			                pid : parent.data.id,
			                name : '',
			                id:''
		                });
			        record.store = grid.getStore();	
		        me.showDetail(grid.detail, record);
	        }
        });